/**
* 查看课程
 */
<template>
    <div class="p10">
        <el-tabs type="border-card">
            <el-tab-pane :label="$t('tabs.basicInfo')">
                <template #label><vp-label zh="基本信息" en="Basic Info"/></template>
                <Course :id="id"  type="view"  ref="courseRef" @formSubmited="getData" ></Course>
            </el-tab-pane>
            <el-tab-pane :label="$t('tabs.operationRecord')">
                <template #label><vp-label zh="操作记录" en="Operation Record"/></template>
                <VpOperationRecordCard :id="formData.zid" ref="rcListRef"></VpOperationRecordCard>
            </el-tab-pane>
        </el-tabs>
    </div>
</template>

<script lang="ts" setup name="viewTrainingCourse">
import { defineAsyncComponent, defineExpose, getCurrentInstance, ref } from 'vue';
import VpOperationRecordCard from '/@/components/vp/operationRecord/VpOperationRecordCard.vue';
import ProcessHistory from '/@/components/vp/workflow/ProcessHistory.vue';
import ProcessView from '/@/components/vp/workflow/ProcessView.vue';
import { useRoute } from 'vue-router';
import StatusBar from '/@/components/vp/status/StatusBar.vue';
const Course = defineAsyncComponent(() => import('./Course.vue'));

const emits = defineEmits<{
    (e: 'formSubmited'): void
}>();

const props= defineProps<{ 
    id: String,
}>();

const courseRef = ref();
const formData = ref({
      id:"",
      zt: null,
      bh:"",
      mc:"",
      nwbs: null,
      bzks: null,
      fxzq: null,
      fxzqdw:null,
      fxks:null,
      pxlbglid: "",
      pxfs: "",
      ckzl: "",
      pxmb:"",
      pxdx:"",
      pxgs:"",
      jddm:"",
      bz:"",
      fjglid:"",
      pxlbQt: "",
      pxlbs: [],
      pxfss: [],
      catalogues: [],
      requirements: [],
      textBooks: [],
      attachments: [],
      processid: "",
      zid:"",
  });

  const getData = (data: any) => {
      formData.value = data;
    };

   const processHandleRef = ref();

defineExpose({
})
</script>
<style scoped lang="scss">

</style>
